﻿#region Imports
using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;
using CommonUtilities.Enums;
using CommonUtilities.Util;
#endregion

namespace RequirementLogger.Appl.Converters
{
    public class VisibilityConverter : IValueConverter
    {
        #region Converter methods
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            Visibility vis = Visibility.Visible; // .Collapsed;
            if (Utilities.IsType<bool>(value, eMatchType.Exact))
                if ((bool)value) vis = Visibility.Visible;

            return vis;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
        #endregion
    }
}
